#include "oled_fonts.h"
#ifndef OLED_H
#define OLED_H

#ifndef OLED_WIDTH
#define OLED_WIDTH 128
#endif

#ifndef OLED_HEIGHT
#define OLED_HEIGHT 64
#endif

#ifndef OLED_ADDR
#define OLED_ADDR 0x78 //设备地址
#endif

#ifndef OLED_PAGE_SIZE
#define OLED_PAGE_SIZE 8
#endif
#ifndef OLED_BUFFER
#define OLED_BUFFER (OLED_WIDTH*OLED_HEIGHT/8)
#endif

typedef enum {
    BLACK = 0,
    WHITE = 1
} oledColor;

void oledInit(void);
void oledUpdate(void);
void oledClear(void);
void writePoint(uint8_t x, uint8_t y, oledColor color);
void drawLine(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, oledColor color);
void drawPoint(uint8_t x, uint8_t y, oledColor color);
void drawCharByPage(uint8_t x, uint8_t y, char ch);
void drawCharBypixel(uint8_t x, uint8_t y, char ch);
void drawString(uint8_t x, uint8_t y, char* str);
void oledFill(uint8_t data);
void drawChinese(uint8_t x, uint8_t y,size_t row ,const uint8_t cnFonts[][CN_WIDTH]);
#endif